package com.xquant.pricing.pricingConfig.service.impl;

import com.xquant.common.security.utils.SecurityUtils;
import com.xquant.pricing.pricingConfig.mapper.ComboBoxMapper;
import com.xquant.pricing.pricingConfig.service.ComboBoxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author ershuai.zhao
 * @Date: 24/12/2019 10:17
 * @Description:
 */
@Service(ComboBoxService.BEAN_NAME)
public class ComboBoxServiceImpl implements ComboBoxService {

    @Autowired
    private ComboBoxMapper comboBoxMapper;

    @Override
    public List<Map<String, Object>> queryPriceCfg(Map<String,Object> params) {
        List<Map<String, Object>> list = comboBoxMapper.queryPriceCfg(params);
        return list;
    }

    @Override
    public List<Map<String, Object>> queryTirCurve(Map<String,Object> params) {
        return comboBoxMapper.queryTirCurve(params);
    }
    @Override
    public List<Map<String, Object>> queryVolSurface(Map<String,Object> params) {
        return comboBoxMapper.queryVolSurface(params);
    }
    @Override
    public List<Map<String, Object>> queryDivYield(Map<String,Object> params) {
            params.put("userId", SecurityUtils.getUserId());
            return comboBoxMapper.queryDivYield(params);
    }
    @Override
    public List<Map<String, Object>> queryDefCurve(Map<String,Object> params) {
        return comboBoxMapper.queryDefCurve(params);
    }

}
